import Vue from 'vue'
import Router from 'vue-router'
// import Login from '@/components/Login/Login.vue'
// import SeaChart from '@/components/SeaChart/SeaChart.vue'
// import Root from '@/components/Root.vue'
// import UserList from '@/components/User/UserList.vue'
// import AuthList from '@/components/User/AuthList.vue'

// import ScheduleTask from '@/components/Task/ScheduleTask/ScheduleTask.vue'
// import CreateScheduleTask from '@/components/Task/ScheduleTask/CreateScheduleTask.vue'
// import EverydayTask from '@/components/Task/EveryDayTask/EverydayTask.vue'
// import CreateEverydayTask from '@/components/Task/EveryDayTask/CreateEverydayTask.vue'
// import OneKeySendTask from '@/components/Task/EveryDayTask/OneKeySendTask.vue'
// import TaskObtain from '@/components/Task/EveryDayTask/TaskObtain.vue'
// import TaskSearch from '@/components/Task/TaskSearch/TaskSearch.vue'
// import TaskSupervision from '@/components/Task/TaskSupervision/TaskSupervision.vue'

// import InnerNoticeList from '@/components/Notice/InnerNotice/InnerNotiveList.vue'
// import InnerNoticeEdit from '@/components/Notice/InnerNotice/InnerNotiveEdit.vue'
// import OutNoticeList from '@/components/Notice/OutNotice/OutNoticeList.vue'
// import OutNoticeEdit from '@/components/Notice/OutNotice/OutNoticeEdit.vue'
// import HistoryNoticeList from '@/components/Notice/HistoryNotice/HistoryNoticeList.vue'
// import SysLogList from '@/components/SysLog/SysLogList.vue'
// import FeedbackList from '@/components/Feedback/FeedbackList.vue'
// import FeedbackEdit from '@/components/Feedback/FeedbackEdit.vue'
// import LinkList from '@/components/Link/LinkList.vue'
// import LinkEdit from '@/components/Link/LinkEdie.vue'

// import DutyCommand from '@/components/Duty/DutyCommand/DutyCommand.vue'
// import DutyLog from '@/components/Duty/DutyLog/DutyLog.vue'
// import DutyLogEdit from '@/components/Duty/DutyLog/DutyLogEdit.vue'
// import DutySum from '@/components/Duty/DutySum/DutySum.vue'
// import DutySumEdit from '@/components/Duty/DutySum/DutySumEdit.vue'

// import LawCase from '@/components/Law/LawCase/LawCase.vue'
// import UploadCase from '@/components/Law/LawCase/UploadCase.vue'
// import LawStatute from '@/components/Law/LawStatute/LawStatute.vue'
// import UploadStatute from '@/components/Law/LawStatute/UploadStatute.vue'

// import DocProduce from '@/components/Document/DocProduce/DocProduce.vue'
// import Berth from '@/components/Document/DocProduce/Berth/Berth.vue'
// import PortRegShip from '@/components/Document/DocProduce/PortRegShip/PortRegShip.vue'
// import Crew from '@/components/Document/DocProduce/Crew/Crew.vue'
// import TransCompany from '@/components/Document/DocProduce/TransCompany/TransCompany.vue'
// import DocSupervise from '@/components/Document/DocSupervise/DocSupervise.vue'
// import SosOrganization from '@/components/Document/SosOrganization/SosOrganization.vue'
// import CreateSos from '@/components/Document/SosOrganization/CreateSos/CreateSos.vue'
// import SosPower from '@/components/Document/SosPower/SosPower.vue'
// import CreateBerth from '@/components/Document/SosPower/CreateBerth/CreateBerth.vue'
// import CreateAerocraft from '@/components/Document/SosPower/CreateAerocraft/CreateAerocraft.vue'
// import SpillOilPower from '@/components/Document/SpillOilPower/SpillOilPower.vue'
// import CreateShip from '@/components/Document/SpillOilPower/CreateShip/CreateShip.vue'
// import CreateWarehouse from '@/components/Document/SpillOilPower/CreateWarehouse/CreateWarehouse.vue'
// import LawForce from '@/components/Document/LawForce/LawForce.vue'
// import CreateForce from '@/components/Document/LawForce/CreateForce/CreateForce.vue'
// import LawEquip from '@/components/Document/LawEquip/LawEquip.vue'
// import Dcustom from '@/components/Document/Dcustom/Dcustom.vue'
// import TaskType from '@/components/Document/Dcustom/TaskType/TaskType.vue'
// import SpecialTask from '@/components/Document/Dcustom/SpecialTask/SpecialTask.vue'
// import TaskObject from '@/components/Document/Dcustom/TaskObject/TaskObject.vue'
// import UserCertificate from '@/components/Document/Dcustom/UserCertificate/UserCertificate.vue'
// import CruisingMileage from '@/components/Document/Dcustom/CruisingMileage/CruisingMileage.vue'
// import TreatmentMeasures from '@/components/Document/Dcustom/TreatmentMeasures/TreatmentMeasures.vue'

// import InsideContactList from '@/components/Contact/InsideContactList.vue'
// import OutsideContactList from '@/components/Contact/OutsideContactList.vue'

Vue.use(Router)

export default new Router({
  // base: '/test/ ',
  routes: [
    {
      path: '/',
      name: 'Root',
      component: r => require(['@/components/Root.vue'], r)
    },
    {
      path: '/login',
      name: 'Login',
      meta: {allowAnonymous: true},
      component: r => require(['@/components/Login/Login.vue'], r)
    },
    {
      path: '/forgot-pwd',
      name: 'ForgotPwd',
      meta: {allowAnonymous: true},
      component: r => require(['@/components/Login/ForgotPwd.vue'], r)
    },
    {
      path: '/message',
      name: 'Message',
      extra: '消息列表',
      component: r => require(['@/components/Message/Message'], r)
    },
    {
      path: '/map',
      name: 'SeaChart',
      extra: '海图',
      component: r => require(['@/components/SeaChart/SeaChart.vue'], r)
    },
    {
      path: '/schedule-task',
      name: 'ScheduleTask',
      extra: '计划任务',
      component: r => require(['@/components/Task/ScheduleTask/ScheduleTask.vue'], r),
      children: [
        {path: 'create', name: 'CreateScheduleTask', component: r => require(['@/components/Task/ScheduleTask/CreateScheduleTask.vue'], r)}
      ]
    },
    {
      path: '/everyday-task',
      name: 'EverydayTask',
      extra: '每日任务',
      component: r => require(['@/components/Task/EveryDayTask/EverydayTask.vue'], r),
      children: [
        {path: 'create', name: 'CreateEverydayTask', component: r => require(['@/components/Task/EveryDayTask/CreateEverydayTask.vue'], r)},
        {path: 'obtain', name: 'TaskObtain', component: r => require(['@/components/Task/EveryDayTask/TaskObtain.vue'], r)},
        {path: 'send', name: 'SendTask', component: r => require(['@/components/Task/EveryDayTask/SendTask.vue'], r)}
      ]
    },
    {
      path: '/task-supervision',
      name: 'TaskSupervision',
      extra: '任务督查',
      component: r => require(['@/components/Task/TaskSupervision/TaskSupervision.vue'], r),
      children: [
        {path: 'create', name: 'supDetail', component: r => require(['@/components/Task/TaskSearch/TaskDetail.vue'], r)},
      ]
    },
    {
      path: '/task-search',
      name: 'TaskSearch',
      extra: '任务查询',
      component: r => require(['@/components/Task/TaskSearch/TaskSearch.vue'], r),
      children: [
        {path: 'create', name: 'searchDetail', component: r => require(['@/components/Task/TaskSearch/TaskDetail.vue'], r)},
      ]
    },
    {
      path: '/inner-notice',
      name: 'InnerNotice',
      extra: '内网公告',
      component: r => require(['@/components/Notice/InnerNotice/InnerNotiveList.vue'], r),
      children: [
        {
          path: 'edit',
          name: 'innerNoticeEdit',
          component: r => require(['@/components/Notice/InnerNotice/InnerNotiveEdit.vue'], r)
        }],
    },
    {
      path: '/out-notice',
      name: 'OutNotice',
      extra: '外网公告',
      component: r => require(['@/components/Notice/OutNotice/OutNoticeList.vue'], r),
      children: [
        {
          path: 'edit',
          name: 'outNoticeEdit',
          component: r => require(['@/components/Notice/OutNotice/OutNoticeEdit.vue'], r)
        }],
    },
    {
      path: '/history-notice',
      name: 'HistoryNotice',
      extra: '历史公告',
      component: r => require(['@/components/Notice/HistoryNotice/HistoryNoticeList.vue'], r),
      children: [],
    },
    {
      path: '/syslog',
      name: 'SysLogList',
      extra: '系统日志',
      component: r => require(['@/components/SysLog/SysLogList.vue'], r),
      children: [],
    },
    {
      path: '/feedback-list',
      name: 'FeedbackList',
      extra: '反馈列表',
      component: r => require(['@/components/Feedback/FeedbackList.vue'], r),
      children: [],
    },
    {
      path: '/feedback-edit',
      name: 'FeedbackEdit',
      extra: '上传反馈',
      component: r => require(['@/components/Feedback/FeedbackEdit.vue'], r),
      children: [],
    },
    {
      path: '/link-list',
      name: 'LinkList',
      extra: '链接列表',
      component: r => require(['@/components/Link/LinkList.vue'], r),
      children: [],
    },
    {
      path: '/link-edit',
      name: 'LinkEdit',
      extra: '添加链接',
      component: r => require(['@/components/Link/LinkEdie.vue'], r),
      children: [],
    },
    {
      path: '/duty-command',
      name: 'DutyCommand',
      extra: '值班管理',
      component: r => require(['@/components/Duty/DutyCommand/DutyCommand.vue'], r)
    },
    {
      path: '/duty-log',
      name: 'DutyLog',
      extra: '值班日志',
      component: r => require(['@/components/Duty/DutyLog/DutyLog.vue'], r),
      children: [
        {path: 'edit', name: 'DutyLogEdit', component: r => require(['@/components/Duty/DutyLog/DutyLogEdit.vue'], r)}
      ]
    },
    {
      path: '/duty-sum',
      name: 'DutySum',
      extra: '值班总结',
      component: r => require(['@/components/Duty/DutySum/DutySum.vue'], r),
      children: [
        {path: 'edit', name: 'DutySumEdit', component: r => require(['@/components/Duty/DutySum/DutySumEdit.vue'], r)}
      ]
    },
    {
      path: '/law-case',
      name: 'LawCase',
      extra: '典型案例',
      component: r => require(['@/components/Law/LawCase/LawCase.vue'], r),
      children: [
        {path: 'edit', name: 'UploadCase', component: r => require(['@/components/Law/LawCase/UploadCase.vue'], r)}
      ]
    },
    {
      path: '/law-statute',
      name: 'LawStatute',
      extra: '法律法规',
      component: r => require(['@/components/Law/LawStatute/LawStatute.vue'], r),
      children: [
        {path: 'edit', name: 'UploadStatute', component: r => require(['@/components/Law/LawStatute/UploadStatute.vue'], r)}
      ]
    },
    {
      path: '/personal-collection',
      name: 'PersonalCollection',
      extra: '法规收藏',
      component: r => require(['@/components/Law/PersonalCollection/PersonalCollection.vue'], r)
    },
    {
      path: '/doc-produce',
      name: 'DocProduce',
      extra: '履职标准',
      component: r => require(['@/components/Document/DocProduce/DocProduce.vue'], r),
      children: [
        {
          path: '', components: {
            PortRegShip: r => require(['@/components/Document/DocProduce/PortRegShip/PortRegShip.vue'], r),
            Crew: r => require(['@/components/Document/DocProduce/Crew/Crew.vue'], r),
            TransCompany: r => require(['@/components/Document/DocProduce/TransCompany/TransCompany.vue'], r),
            Berth: r => require(['@/components/Document/DocProduce/Berth/Berth.vue'], r)
          }
        }
      ]
    },
    {
      path: '/doc-supervise',
      name: 'DocSupervise',
      extra: '基础数据',
      component: r => require(['@/components/Document/DocSupervise/DocSupervise.vue'], r),
      children: [
        // {path: 'edit', name: 'UploadStatute', component: UploadStatute}
      ]
    },
    {
      path: '/sos-organization',
      name: 'SosOrganization',
      extra: '搜救机构',
      component: r => require(['@/components/Document/SosOrganization/SosOrganization.vue'], r),
      children: [
        {path: 'edit', name: 'CreateSos', component: r => require(['@/components/Document/SosOrganization/CreateSos/CreateSos.vue'], r)}
      ]
    },
    {
      path: '/sos-power',
      name: 'SosPower',
      extra: '搜救力量',
      component: r => require(['@/components/Document/SosPower/SosPower.vue'], r),
      children: [
        {path: 'create-berth', name: 'CreateBerth', component: r => require(['@/components/Document/SosPower/CreateBerth/CreateBerth.vue'], r)},
        {path: 'create-aerocraft', name: 'CreateAerocraft', component: r => require(['@/components/Document/SosPower/CreateAerocraft/CreateAerocraft.vue'], r)}
      ]
    },
    {
      path: '/spill-oil-power',
      name: 'SpillOilPower',
      extra: '溢油力量',
      component: r => require(['@/components/Document/SpillOilPower/SpillOilPower.vue'], r),
      children: [
        {path: 'create-ship', name: 'CreateShip', component: r => require(['@/components/Document/SpillOilPower/CreateShip/CreateShip.vue'], r)},
        {path: 'create-warehouse', name: 'CreateWarehouse', component: r => require(['@/components/Document/SpillOilPower/CreateWarehouse/CreateWarehouse.vue'], r)}
      ]
    },
    {
      path: '/law-force',
      name: 'LawForce',
      extra: '执法力量',
      component: r => require(['@/components/Document/LawForce/LawForce.vue'], r),
      children: [
        {path: 'create-force', name: 'CreateForce', component: r => require(['@/components/Document/LawForce/CreateForce/CreateForce.vue'], r)}
      ]
    },
    {
      path: '/law-equip',
      name: 'LawEquip',
      extra: '执法装备',
      component: r => require(['@/components/Document/LawEquip/LawEquip.vue'], r),
      children: [
        // {path: 'edit', name: 'UploadStatute', component: UploadStatute}
      ]
    },
    {
      path: '/dcustom',
      name: 'Dcustom',
      extra: '自定义',
      component: r => require(['@/components/Document/Dcustom/Dcustom.vue'], r),
      children: [
        {
          path: '', components: {
            TaskType: r => require(['@/components/Document/Dcustom/TaskType/TaskType.vue'], r),
            SpecialTask: r => require(['@/components/Document/Dcustom/SpecialTask/SpecialTask.vue'], r),
            TaskObject: r => require(['@/components/Document/Dcustom/TaskObject/TaskObject.vue'], r),
            UserCertificate: r => require(['@/components/Document/Dcustom/UserCertificate/UserCertificate.vue'], r),
            CruisingMileage: r => require(['@/components/Document/Dcustom/CruisingMileage/CruisingMileage.vue'], r),
            TreatmentMeasures: r => require(['@/components/Document/Dcustom/TreatmentMeasures/TreatmentMeasures.vue'], r)
          }
        }
      ]
    },
    {
      path: '/supervise',
      name: 'Supervise',
      extra: '生产线',
      component: r => require(['@/components/Statistics/Supervise/Supervise.vue'], r)
    },
    {
      path: '/produce',
      name: 'Produce',
      extra: '监管线',
      component: r => require(['@/components/Statistics/Produce/Produce.vue'], r)
    },
    {
      path: '/ensure',
      name: 'Guarantee',
      extra: '保障线',
      component: r => require(['@/components/Statistics/Guarantee/Guarantee.vue'], r)
    },
    {
      path: '/listCctv',
      name: 'ListCctv',
      extra: 'CCTV列表',
      component: r => require(['@/components/Statistics/Guarantee/ListCctvSite.vue'], r)
    },
    {
      path: '/listVtsSubCenter',
      name: 'ListVtsSubCenter',
      extra: 'VTS分中心列表',
      component: r => require(['@/components/Statistics/Guarantee/ListVtsSubCenter.vue'], r)
    },
    {
      path: '/listSosFlydev',
      name: 'ListSosFlydev',
      extra: '救助飞行器列表',
      component: r => require(['@/components/Statistics/Guarantee/ListSosFlydev.vue'], r)
    },
    {
      path: '/listVtsRadarSt',
      name: 'ListVtsRadarSt',
      extra: 'VTS雷达站列表',
      component: r => require(['@/components/Statistics/Guarantee/ListVtsRadarSt.vue'], r)
    },
    {
      path: '/listEmWarehouse',
      name: 'ListEmWarehouse',
      extra: '溢油应急库列表',
      component: r => require(['@/components/Statistics/Guarantee/ListEmWarehouse.vue'], r)
    },
    {
      path: '/listEmmerShip',
      name: 'ListEmmerShip',
      extra: '溢油应急船舶列表',
      component: r => require(['@/components/Statistics/Guarantee/ListEmmerShip.vue'], r)
    },
    {
      path: '/listSosShipPro',
      name: 'ListSosShipPro',
      extra: '专业救助船舶列表',
      component: r => require(['@/components/Statistics/Guarantee/ListSosShipPro.vue'], r)
    },
    {
      path: '/listSosShipSoc',
      name: 'ListSosShipSoc',
      extra: '社会力量救助船舶列表',
      component: r => require(['@/components/Statistics/Guarantee/ListSosShipSoc.vue'], r)
    },
    {
      path: '/sosOrgTree',
      name: 'SosOrgTree',
      extra: '搜救机构',
      component: r => require(['@/components/Statistics/Guarantee/SosOrgTree.vue'], r)
    },
    {
      path: '/user',
      name: 'UserList',
      extra: '用户列表',
      component: r => require(['@/components/User/UserList.vue'], r)
    },
    {
      path: '/applyuser',
      name: 'ApplyUserList',
      extra: '申报用户列表',
      component: r => require(['@/components/ApplyUser/ApplyUser.vue'], r)
    },
    {
      path: '/adjust',
      name: 'UserAdjust',
      extra: '人员调整',
      component: r => require(['@/components/User/UserAdjust.vue'], r)
    },
    {
      path: '/auth',
      name: 'AuthList',
      extra: '权限管理',
      component: r => require(['@/components/User/AuthList.vue'], r)
    },
    {
      path: '/inside-contact',
      name: 'InsideContactList',
      extra: '内部通讯录',
      component: r => require(['@/components/Contact/InsideContactList.vue'], r)
    },
    {
      path: '/outside-contact',
      name: 'OutsideContactList',
      extra: '外部通讯录',
      component: r => require(['@/components/Contact/OutsideContactList.vue'], r)
    },
    {
      path: '/change-pwd',
      name: 'ChangePwd',
      extra: '修改密码',
      component: r => require(['@/components/Login/ChangePwd.vue'], r)
    },
    {
      path: '/approval',
      name: 'PlanApproval',
      extra: '作业计划申请审批',
      component: r => require(['@/components/Plan/PlanApproval/PlanApproval.vue'], r)
    },
    {
      path: '/black-list',
      name: 'BlackList',
      extra: '黑名单管理',
      component: r => require(['@/components/WhiteBlackList/BlackList.vue'], r)
    },
    {
      path: '/white-list',
      name: 'WhiteList',
      extra: '黑名单管理',
      component: r => require(['@/components/WhiteBlackList/WhiteList.vue'], r)
    },
    {
      path: '/danger-data-analysis',
      name: 'DangerDataAnalysis',
      extra: '危险品大数据分析',
      component: r => require(['@/components/DangerDataAnalysis/DangerDataAnalysis.vue'], r)
    },
    {
      path: '/danger-black-list',
      name: 'DangerBlackList',
      extra: '危险品大数据分析(黑名单)',
      component: r => require(['@/components/DangerDataAnalysis/DangerBlackList.vue'], r)
    },
    {
      path: '/danger-info-maintain',
      name: 'DangerInfoMaintain',
      extra: '危险品信息维护',
      component: r => require(['@/components/DangerInfoMaintain/DangerInfoMaintain.vue'], r)
    },
    {
      path: '/warning',
      name: 'Alarm',
      extra: '船舶报警',
      component: r => require(['@/components/Alarm/Alarm.vue'], r)
    }
  ]
})
